<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <title>Vue</title>
  </head>
<body>
  <div id="root">
    <h1>欢迎来到{{name}}学习</h1>
    <button v-on:click="showInfo">点我提示信息</button>
  </div>
  <script>
    Vue.config.productionTip = false
    const vm = new Vue({
      el:'#root',
      data: {
        name: '尚硅谷'
      },
      methods:{
        showInfo() {
          alert('同学你好')
        },
        showInfo() {
          alert('同学你好')
        }
      }
    })
  </script>
</body>
</html>